﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TestPages.UserControls
{
	public partial class LoginUserControl : System.Web.UI.UserControl
	{
		//add css file 
		private string cSS;
		public string CSS
		{
			get { return cSS; }
			set
			{
				cSS = value;


				//Page.AddStyle(CSS);
				((BasePage)Page).AddStyle(CSS);
			
			}
		}

		//add script on page
		private string script;
		public string Script
		{
			get { return script; }
			set
			{
				script = value;


				//Page.AddStyle(CSS);
				((BasePage)Page).AddScript(Script);
			}
		}

		protected void Page_Load(object sender, EventArgs e)
		{
				if(!IsPostBack)
				{
				
				}

		}



		public event EventHandler<UserControlEventArgs> ButtonClicked;

		protected void BtnSubmit_Click(object sender, EventArgs e)
		{
			var Temp = ButtonClicked;
			if (Temp != null)
			{
				Temp(this, new UserControlEventArgs(TbxPassword.Text, TbxUserName.Text));
			}
		}
	}
}